<template>
  <div class="plan-area-view">

    <el-table
      :data="list"
      border
      header-cell-class-name="table-header"
    >
      <el-table-column
        type="index"
        width="55"
        label="序号"
      />
      <el-table-column
        align="center"
        header-align="center"
        label="招商地区"
        prop="name"
        width="150"
      />
      <el-table-column
        align="center"
        header-align="center"
        label="招商类型"
        width="150"
      >
        <template #default="scope">
          <span>{{ getLabel('plan_type', scope.row.detailPlanType) }}</span>
        </template>
      </el-table-column>
      <el-table-column
        align="center"
        header-align="center"
        label="代理周期"
        width="150"
      >
        <template #default="scope">

          <span>{{ scope.row.agentCycle }}年</span>

        </template>
      </el-table-column>
      <el-table-column
        align="center"
        header-align="center"
        label="最低销量"
        min-width="150"
      >
        <template #default="scope">

          <span v-if="scope.row.isIncrease == 1">{{ scope.row.minSale }}{{
              getLabel('sell_unit', datas.sellUnit)
            }}/年</span>
          <span v-else>首年{{ scope.row.minSale }}{{ getLabel('sell_unit', datas.sellUnit) }},每年递增{{
              scope.row.increaseNum
            }}%</span>

        </template>
      </el-table-column>
      <el-table-column
        align="center"
        header-align="center"
        label="销量保证金(元)"
        prop="sellEarnestMoney"
      />
      <el-table-column
        align="center"
        header-align="center"
        label="其他说明"
        prop="remark"
      />

    </el-table>

  </div>
</template>

<script>
import { defineComponent, reactive, toRefs } from 'vue'

export default defineComponent({
  name: 'AreaView',
  props: {
    list: {
      type: Array,
      default: [],
    },
    datas: {
      type: Object,
      default: {},
    },
  },
  setup(props, { emit }) {
    var data = reactive({})

    return {
      ...toRefs(data),
    }
  },
})
</script>

<style scoped>
</style>
